-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if ref'd resource is selected before favoring state #10108
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10108 +/- ##
==========================================
- Coverage 88.23% 88.19% -0.05%
==========================================
Files 181 181
Lines 22770 22770
==========================================
- Hits 20092 20081 -11
- Misses 2678 2689 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
# User has explicitly opted to prefer defer_relation for unselected resources | ||
( | ||
self.config.args.favor_state | ||
and target_model.unique_id not in selected_resources.SELECTED_RESOURCES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a global (ew), and has been for a while:
* Add test case * Check if ref'd resource is selected before favoring state * Add changie (cherry picked from commit 84cc540)
…10114) * Add test case * Check if ref'd resource is selected before favoring state * Add changie (cherry picked from commit 84cc540) Co-authored-by: Jeremy Cohen <[email protected]>
resolves #10107
Problem
Previous behavior of
--favor-state
+--defer
, when selecting multiple resources that build on top of each other, was to favor state for only unselected resources.The recent deferral refactors (#9040 + #9199) implicitly changed this behavior, by favoring state always.
Solution
Check to see whether a referenced node is selected (using
selected_resources
global) before favoring state (defer_relation
).I have added a test case that:
1.7.latest
(86df655)main
Checklist